<!DOCTYPE html>
<html> 

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
		<title>地图</title>
			<link rel="stylesheet" type="text/css" href="assets/css/reset.css" />
			<link rel="stylesheet" type="text/css" href="assets/css/flex.css" />
			<link rel="stylesheet" type="text/css" href="assets/css/animate.css" />
			<link rel="stylesheet" type="text/css" href="assets/css/font-awesome.min.css" />
			<link rel="stylesheet" type="text/css" href="assets/css/skin/layer.css" />
			<link rel="stylesheet" type="text/css" href="assets/css/app.css" />
			
			<script type="text/javascript" charset="utf-8">
				console.time("test");
				/*
				    # 按照宽高比例设定html字体, width=device-width initial-scale=1版
				    # @pargam win 窗口window对象
				    # @pargam option{
				      designWidth: 设计稿宽度，必须
				      designHeight: 设计稿高度，不传的话则比例按照宽度来计算，可选
				      designFontSize: 设计稿宽高下用于计算的字体大小，默认20，可选
				      callback: 字体计算之后的回调函数，可选
				    }
				    # return Boolean;
				    # xiaoweili@tencent.com
				    # ps:请尽量第一时间运行此js计算字体
				*/
				! function(win, option) {
					var count = 0,
						designWidth = option.designWidth,
						designHeight = option.designHeight || 0,
						designFontSize = option.designFontSize || 20,
						callback = option.callback || null,
						root = document.documentElement,
						body = document.body,
						rootWidth, newSize, t, self;
					root.style.width = '100%';
					//返回root元素字体计算结果
					function _getNewFontSize() {
						var scale = designHeight !== 0 ? Math.min(win.innerWidth / designWidth, win.innerHeight / designHeight) : win.innerWidth / designWidth;
						console.log(win.innerHeight,designHeight);
						return parseInt(scale * 10000 * designFontSize) / 10000;
					}! function() {
						rootWidth = root.getBoundingClientRect().width;
						self = self ? self : arguments.callee;
						//如果此时屏幕宽度不准确，就尝试再次获取分辨率，只尝试20次，否则使用win.innerWidth计算
						if(rootWidth !== win.innerWidth && count < 20) {
							win.setTimeout(function() {
								count++;
								self();
							}, 0);
						} else {
							newSize = _getNewFontSize();
							//如果css已经兼容当前分辨率就不管了
							if(newSize + 'px' !== getComputedStyle(root)['font-size']) {
								root.style.fontSize = newSize + "px";
								return callback && callback(newSize);
							};
						};
					}();
					//横竖屏切换的时候改变fontSize，根据需要选择使用
					win.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function() {
						clearTimeout(t);
						t = setTimeout(function() {
							self();
						}, 300);
					}, false);
				}(window, {
					designWidth: 750,
					designHeight: 1333,
					designFontSize: 100,
					callback: function(argument) {
						console.timeEnd("test")
					}
				});
			</script>
	</head>

	<body class="tw-zdcym">
		<div id="loadBg" style="position:fixed;top:0;left:0;right:0;bottom:0;background:#10a5d1;z-index:99;"></div>
		
		<input type="hidden" id="chart-font-size" />
		<div id="tw-content">
			<div class="tw-head">
				<span class="title">南通市重大产业项目智能监测服务系统</span>
			</div>
			<div class="tw-map-box">
				<iframe src="mobileMap/mobile-map.html" frameborder="0" height="100%" width="100%"></iframe>
			</div>
		</div>
		
		<div id="tw-menu" class="flex-row">
			<a href="index.html" class="flex-row-item">
				<span class="fa fa-home"></span>
				<span class="txt">首页</span>
			</a>
			<a href="" class="flex-row-item">
				<span class="fa fa-tasks"></span>
				<span class="txt">项目</span>
			</a>
			<a href="" class="flex-row-item">
				<span class="fa fa-bar-chart"></span>
				<span class="txt">统计</span>
			</a>
			<a href="map.html" class="flex-row-item on">
				<span class="fa fa-map"></span>
				<span class="txt">地图</span>
			</a>
		</div>
		
		<script src="assets/js/require.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" charset="utf-8">
			require(['app'], function(app) {
				'use strict';
				new app().init();
			});
		</script>
	</body>
</html>